<html>

<head>
    <meta charset="utf-8">
</head>

<body>
    <h1>client客户端</h1>
</body>
<script type="module">
    import * as sys from "@sys";
    console.log("sys", sys);

    console.log("acc", acc);
    let client = new sys.TCP();
    let d = client.connect({ ip: "127.0.0.1", port: 3412 }).then(con => {
        console.log(`Connected to ${con.getpeername()}`);
    }, err => {
        console.log("ddderr", err);
    });
    console.log("cc", client.getsockname());

    // while(true){
    //     let data = client.read();
    //     if (!data) {
    //         console.log('connection closed!');
    //         break;
    //     }
    //     console.log("dd",data);
    // }

</script>

</html>